#include "calClient.hpp"

#include <iostream>
#include <memory>

static void Usage(string str)
{
    cout << "Usage: " << str << " server_ip server_port" << endl;
}

int main(int argc, char *argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }

    string server_ip = argv[1];
    uint16_t server_port = atoi(argv[2]);
    unique_ptr<Client> clt(new Client(server_ip, server_port));
    clt->initClient();
    clt->start();

    return 0;
}